<!doctype html>
<html>

<head>
	<meta charset="utf-8">
	<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
	<meta name="format-detection" content="telephone=no" />
	<title>首页</title>
	<link rel="stylesheet" type="text/css" href="../c/aui.css" />
</head>
<style>
.t{
	height: 3rem;
	/*background: #f00;*/
	line-height: 3rem;
	padding: 0 0.75rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	border-bottom: 1px solid #252525;
	position:sticky;
	top: 0;
	left: 0;
	width: 100%;
	z-index: 2;
	background: #161823;
}
.t img{
	width: 1rem;
}
.i {
	padding: 0.75rem;
}
.i div{
	padding: 0.35rem;
}
.i div span{
	background: #f00;
	display: block;
	background:rgba(255, 255, 255, 0.1);
	width: 2.5rem;
	height: 2.5rem;
	line-height: 2.5rem;
	text-align: center;
	font-size: 0.75rem;
	border-radius: 0.25rem;
	margin-right: 0.45rem;
  flex-shrink: 0;
	letter-spacing: 1.5px;
}
.i div span.a{
	background: #FE2C55;
}
</style>
<body>
	<div id="sx-view"></div>
	<script id="sx-list" type="text/x-dot-template">
		<div class="t" tapmode onclick="x()">
			<div class="title">总{{= v.data.length }}集</div>
			<img src="../i/x.png">
		</div>
		<div class="aui-row i">
		{{ for(var i=0; i < v.data.length; i++) { }}
		<div class="aui-col-5">
			<span class="{{= i==api.pageParam['index']?'a':''}}" tapmode onclick='xuanji({{= i}},this)'>{{= i+1}}</span>
		</div>
		{{ } }}
		</div>
	</script>
</body>
<script type="text/javascript" src="../j/api.js"></script>
<script type="text/javascript">
	var v = [];
	apiready = function() {
		v = api.pageParam['v'];
		var evalData = doT.template($api.html($api.byId('sx-list')));
		$api.html($api.byId('sx-view'), evalData());
		api.parseTapmode();
	};

	function x() {
		api.closeFrame();
	}
	function xuanji(index,_this){
		api.execScript({
		    frameName: 'fang_view',
		    script: 'xuanji('+index+');'
		});
		$('.a').removeClass('a');
		$(_this).addClass('a');
	}
</script>

</html>
